<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"  
    xmlns:h="http://java.sun.com/jsf/html"  
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:ui="http://java.sun.com/jsf/facelets"  
    xmlns:p="http://primefaces.org/ui"> 
    <h:head>
        <title>Facelet Title</title>
    </h:head>
    <h:body>

	<ui:composition template="/template.xhtml">
	        <ui:define name="ui_right"> 
        	<h:form>
	            <p:panel header="Rejestracja do portalu">  
	            <p:messages id="messages"/>
	                <h:panelGrid columns="2" columnClasses="column" cellpadding="5">
	                    <h:outputText value="Login"/>
	                    <p:inputText  label="Login" value="#{userRegBean.user.login}" required="true"/>
	
	                    <h:outputText value="Hasło"/>
	                    <p:password label="Hasło" feedback="true" 
	                    		inline="true" promptLabel="Wpisz hasło" weakLabel="Słabe" 
	                    		goodLabel="Średnie" strongLabel="Silne" 
	                    		value="#{userRegBean.user.password}"  required="true"/>  
	                    
	                    <h:outputText value="Powtórz hasło"/>
	                    <p:password label="Powtórz hasło" value="#{userRegBean.password2}"  required="true"/> 
	                    
	                    <h:outputText value="Adres e-mail"/>
	                    <p:inputText label="Adres e-mail" value="#{userRegBean.user.email}"  required="true"/> 
	
	                    <h:outputText value="Powtórz e-mail"/>
	                    <p:inputText label="Powtórz e-mail" value="#{userRegBean.email2}"  required="true"/> 
	                    
	                    <h:outputText/>
	                    <p:commandButton value="Potwierdź" actionListener="#{userRegBean.tryRegister}" update="result" ajax="false"/>
						
	                </h:panelGrid>
	            </p:panel>
        	</h:form>
        </ui:define>
	    </ui:composition>
    </h:body>
</html>